---
layout: "default"
title: "lazy"
description: "Swift documentation for 'lazy': Augment s with lazy methods such as map, filter, etc."
keywords: "lazy,func,swift,documentation"
root: "/v1.2"
---

<div class="declaration" id="func-lazy-s_-sequencetype_-s">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-lazy-s_-sequencetype_-s">func <wbr>lazy&lt;S : SequenceType&gt;(<wbr>_: S)</a>
        
<div class="comment collapse" id="comment-func-lazy-s_-sequencetype_-s"><div class="p">
    <p>Augment <code>s</code> with lazy methods such as <code>map</code>, <code>filter</code>, etc.</p>

    <h4>Declaration</h4>    
    <code class="language-swift">func lazy&lt;S : SequenceType&gt;(s: S) -&gt; LazySequence&lt;S&gt;</code>
    
    
</div></div>
</div>
<div class="declaration" id="func-lazy-s_-collectiontype-where-s-index_-forwardindextype_-s">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-lazy-s_-collectiontype-where-s-index_-forwardindextype_-s">func <wbr>lazy&lt;S :<wbr> CollectionType where S.Index : ForwardIndexType&gt;(<wbr>_: S)</a>
        
<div class="comment collapse" id="comment-func-lazy-s_-collectiontype-where-s-index_-forwardindextype_-s"><div class="p">
    <p>Augment <code>s</code> with lazy methods such as <code>map</code>, <code>filter</code>, etc.</p>

    <h4>Declaration</h4>    
    <code class="language-swift">func lazy&lt;S : CollectionType where S.Index : ForwardIndexType&gt;(s: S) -&gt; LazyForwardCollection&lt;S&gt;</code>
    
    
</div></div>
</div>
<div class="declaration" id="func-lazy-s_-collectiontype-where-s-index_-randomaccessindextype_-s">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-lazy-s_-collectiontype-where-s-index_-randomaccessindextype_-s">func <wbr>lazy&lt;S :<wbr> CollectionType where S.Index : RandomAccessIndexType&gt;(<wbr>_: S)</a>
        
<div class="comment collapse" id="comment-func-lazy-s_-collectiontype-where-s-index_-randomaccessindextype_-s"><div class="p">
    <p>Augment <code>s</code> with lazy methods such as <code>map</code>, <code>filter</code>, etc.</p>

    <h4>Declaration</h4>    
    <code class="language-swift">func lazy&lt;S : CollectionType where S.Index : RandomAccessIndexType&gt;(s: S) -&gt; LazyRandomAccessCollection&lt;S&gt;</code>
    
    
</div></div>
</div>
<div class="declaration" id="func-lazy-s_-collectiontype-where-s-index_-bidirectionalindextype_-s">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-lazy-s_-collectiontype-where-s-index_-bidirectionalindextype_-s">func <wbr>lazy&lt;S :<wbr> CollectionType where S.Index : BidirectionalIndexType&gt;(<wbr>_: S)</a>
        
<div class="comment collapse" id="comment-func-lazy-s_-collectiontype-where-s-index_-bidirectionalindextype_-s"><div class="p">
    <p>Augment <code>s</code> with lazy methods such as <code>map</code>, <code>filter</code>, etc.</p>

    <h4>Declaration</h4>    
    <code class="language-swift">func lazy&lt;S : CollectionType where S.Index : BidirectionalIndexType&gt;(s: S) -&gt; LazyBidirectionalCollection&lt;S&gt;</code>
    
    
</div></div>
</div>
